<?php

class Mp3_MusicBrainz{



	public function __construct(){
		
	}

	public static function getInfoArtista($artista){
		$base = 'http://musicbrainz.org/ws/2/artist/';
		$params = array('query' => 'artist:'.$artista);
		$url = $base."?".http_build_query($params);
		$resposta = file_get_contents($url);
		$xml = new SimpleXMLElement($url, 0, true);
		return $xml;
	}
	
	public static function getInfoCanco($canco, $artista){
		$base = 'http://musicbrainz.org/ws/2/recording/';
		$params = array('query' => 'recording:'.$canco.' AND artist:'.$artista);
		$url = $base."?".http_build_query($params);
		$resposta = file_get_contents($url);
		$xml = new SimpleXMLElement($url, 0, true);
		return $xml;
	}


}